<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/flow/q_WorkFlowTable.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/flow/q_WorkFlowTable.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'WorkFlowTable_Id',
                footer: "Foots",
                cnName: '我的审批',
                name: 'flow/q_WorkFlowTable',
                url: "/q_WorkFlowTable/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"WorkTableName":"","CurrentStepId":"","CreateDate":"","AuditStatus":"","sfdqsp":""});
            const searchFormOptions = ref([[{"title":"业务名称","field":"WorkTableName","type":"like"},{"title":"当前节点","field":"CurrentStepId"},{"dataKey":"audit","data":[],"title":"审批状态","field":"AuditStatus","type":"select"},{"dataKey":"enable","data":[],"title":"是否当前审批","field":"sfdqsp","type":"select"},{"title":"创建时间","field":"CreateDate","type":"datetime"}]]);
            const columns = ref([{field:'WorkFlowTable_Id',title:'WorkFlowTable_Id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'WorkFlow_Id',title:'流程id',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'WorkName',title:'流程名称',type:'string',width:150,hidden:true,align:'left'},
                       {field:'WorkTableKey',title:'WorkTableKey',type:'string',width:180,hidden:true,align:'left'},
                       {field:'WorkTable',title:'表名',type:'string',width:180,hidden:true,align:'left'},
                       {field:'WorkTableName',title:'业务名称',type:'string',width:150,align:'left',sort:true},
                       {field:'CurrentStepId',title:'当前节点',type:'string',width:100,hidden:true,align:'left'},
                       {field:'StepName',title:'当前节点名称',type:'string',width:150,align:'left'},
                       {field:'StepId',title:'审批节点',type:'string',width:100,hidden:true,align:'left'},
                       {field:'spjdm',title:'审批节点名称',type:'string',width:150,align:'left'},
                       {field:'yh',title:'审批用户',type:'string',bind:{ key:'用户',data:[]},width:100,align:'left'},
                       {field:'js',title:'审批角色',type:'string',bind:{ key:'roles',data:[]},width:100,align:'left'},
                       {field:'bm',title:'审批部门',type:'string',bind:{ key:'组织机构',data:[]},width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'AuditStatus',title:'审批状态',type:'int',bind:{ key:'audit',data:[]},width:100,align:'left'},
                       {field:'sfdqsp',title:'是否当前审批',type:'int',bind:{ key:'enable',data:[]},width:100,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
